home *** CD-ROM | disk | FTP | other *** search
/ Champak 26 (Anniversary Edition) / Volume 26 [Anniversary Edition] - JOGO DISK .iso / DEPOSITO / REmovido / Puzzle / Memory2000.swf / scripts / DefineButton2_28 / BUTTONCONDACTION on(release).as
Text File  |  2001-07-16  |  764b  |  39 lines

  1. on(release){
  2.    tellTarget("../")
  3.    {
  4.       your_pick = "3";
  5.       must = int(eval("color" add int(your_level + "1")));
  6.    }
  7.    if(eval("..:your_pick") eq eval("..:must"))
  8.    {
  9.       set("..:your_level",int(eval("..:your_level") + "1"));
  10.       tellTarget("well")
  11.       {
  12.          gotoAndStop("ok");
  13.          play();
  14.       }
  15.    }
  16.    else
  17.    {
  18.       tellTarget("well")
  19.       {
  20.          gotoAndStop("bad");
  21.          play();
  22.       }
  23.       tellTarget("../")
  24.       {
  25.          gotoAndStop("gameover");
  26.       }
  27.    }
  28.    if(eval("..:your_level") eq int(eval("..:highest")))
  29.    {
  30.       tellTarget("../")
  31.       {
  32.          gotoAndStop("get");
  33.          play();
  34.       }
  35.       set("..:your_level","0");
  36.       set("..:your_pick","0");
  37.    }
  38. }
  39.